package main

import (
	"net/http"
	"login"
	"pool"
	"wds"
)

func main() {
	pool.InitMySQL()
	pool.InitMongoDB()
	
	http.HandleFunc("/z/login/", login.Handler)
	http.HandleFunc("/z/userwds/", wds.Userwds)
	http.HandleFunc("/z/addwd/", wds.Addwd)
	http.HandleFunc("/z/detail/", wds.Detail)
	http.HandleFunc("/z/search/", wds.Search)

	err := http.ListenAndServe(":8080", nil)
	if err != nil {
		println("ListenAndServe:", err.Error())
	}
}

